<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.js"></script>
</head>
<body>
    <div id="app"></div>
</body>
<script>
    const app = Vue.createApp({
        template:`<hello style="color:red;" msg="消息"/>`
    })
    app.component("hello",{
        // 接收但不使用就可以使父组件的传值不起作用
        // props:['style']
        // ,inheritAttrs: false
        // 在业务逻辑中使用Non-props属性
        mounted() {
            console.log(this.$attrs.msg)
        },
        template:`<h3 v-bind:style="$attrs.style">你好</h3>`
    })
    app.mount("#app")
</script>
</html>